// --------------------------------------------------------------------------------------------------------------------------------
// --------------------------------------------------------------------------------------------------------------------------------
// behaviours input button rollovers - this is for IE6 only;
// this file is included via conditional comment for IE6 only.
// also deals with card image processing - a (replaces PNG card images with background images for IE6 only);
// depends: 	jQuery library;
// author:		mdja;
// --------------------------------------------------------------------------------------------------------------------------------
// --------------------------------------------------------------------------------------------------------------------------------


// -- define namespace;
if (typeof Compare !== 'object') var Compare={};

// -- define card selector object;
Compare.buttonManager = new (function(){
	// public methods;
	this.onReady = function() {
		$('span.button').each(function() {
			if ($(this).hasClass('unavailable')) return;
			$(this).mouseover(function() {this.className='button buttonover';}).mouseout(function() {this.className='button';});			
		});
		
		
		$('span.smallbutton').each(function() {
			if ($(this).hasClass('unavailable')) return;
			$(this).mouseover(function() {this.className='smallbutton smallbuttonover';}).mouseout(function() {this.className='smallbutton';});
		});
		
		
		$('span.silver_button').each(function() {
			if ($(this).hasClass('unavailable')) return;
			$(this).mouseover(function() {this.className='silver_button silver_buttonover';}).mouseout(function() {this.className='silver_button';});			
		});
		
	};
	
});

// -- define image processing object;
Compare.imageManager = new (function() {
	this.onReady = function() {
		//var str_filter = 
		
		$('div.cardSummary div.image img').
		each(function() {
			var str_filter ="filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + this.src + "', sizingMethod='crop');",
				str_html = '<span style="' + str_filter + '"></span>';
			$(this).wrap(str_html);
		});
	};
});

$(document).ready(function(){Compare.buttonManager.onReady(); Compare.imageManager.onReady();});

// --------------------------------------------------------------------------------------------------------------------------------
// --- end of file --- 
// -------------------------------------------------------------------------------------------------------------------------------
